#include "EventPoller.h"
#include "Game.h"
#include "GameOverState.h"
#include "SplashState.h"

GameOverState::GameOverState()
{
	m_background.Load("Images/Game Over.png");
}

void GameOverState::Draw()
{
	m_background.Draw(0, 0, Screen::Instance());
}

void GameOverState::Update()
{
	
}

void GameOverState::OnKeyBoardEvent(const SDL_KeyboardEvent& k)
{
	if(k.keysym.sym == SDLK_s && k.state == SDL_PRESSED)
	{
		TheGame::Instance()->SetGameState(TheSplashState::Instance());
	}

	if(k.keysym.sym == SDLK_ESCAPE && k.state == SDL_PRESSED)
	{
		exit(0);
	}
}